<?php 

include './function.php';

if($_POST){
	if(!empty($_POST['username']) && !empty($_POST['content'])){

		$db = include './db.php';

		$row = $_POST;

		$row['time']=date('Y-m-d H:i:s');

		$db[]=$row;


		$str = var_export($db,True);

		$str = "<?php return ".$str."?>";

		file_put_contents('./db.php', $str);

		success('./index.php','发布成功');


	}else{
		error('./index.php','信息不完整，请重新输入');
	}

}else{
	error('./index.php','非法请求');
}














 ?>